﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CPEBookWin.Controls
{
    public partial class CommentaireControl : UserControl
    {
        public int idutilisateur { get; set; }

        public string username { 
            set { linkUserName.Text = value; }
        }

        public string text { 
            set { lblCommentaire.Text = value; } 
        }

        public DateTime date { 
            set { lblDate.Text = "Le " + value.ToString("dd/MM/yyyy") + " à " + value.ToString("HH:mm"); } 
        }

        public CommentaireControl()
        {
            InitializeComponent();
        }

        private void linkUserName_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            ((MasterForm)this.ParentForm).idUtilisateurProfil = idutilisateur;
            ((MasterForm)this.ParentForm).afficherProfil();
        }
    }
}
